{extend name="$adminViewPath.public.iframe.layout"}

{block name="head_style"}
<style type="text/css">
    .layui-elem-quote{
        word-wrap: break-word;
        word-break: normal;
    }
</style>
{/block}

{block name="content"}
<div class="layui-col-md12">
    <div class="layui-card">
        <div class="layui-card-body ">
            <blockquote class="layui-elem-quote">欢迎:
                <span class="x-red">yunj</span>！当前时间:2020-02-02 12:07:19
            </blockquote>
            <blockquote class="layui-elem-quote">源码地址:
                <a target="_blank" href="https://gitee.com/worklz/yunj_admin_universal.git" title="云静Admin">
                    https://gitee.com/worklz/yunj_admin_universal.git
                </a>
            </blockquote>
            <blockquote class="layui-elem-quote">开发文档:
                <a target="_blank" href="https://www.kancloud.cn/worklz/yunj_admin_universal/2009454" title="云静Admin">
                    https://www.kancloud.cn/worklz/yunj_admin_universal/2009454
                </a>
            </blockquote>
            <!--<button id="close_all">关闭所有</button>-->
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script type="text/javascript">
layui.use(["jquery",'yunj',"validate"],function (){
    let win = window;
    let doc = document;
    let $ = layui.jquery;
    let validate = layui.validate;


    $(doc).on("click","#close_all",function () {
        console.log(123);
        yunj.closeAll();
    });


    let data = {
        "name":"xiangwang",
        "age":18
    };
    let res = validate.rule({
        "name":"require",
        "age":"require"
    }).check(data);
    if(res){
        // 验证通过
    }else {
        // 验证失败，获取错误提示
        let error = validate.getError();
        console.log(error);
    }
});
</script>
{/block}